-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Update Installation for windows #553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There were some important things that should have been mentioned in this tutorial, and it took me a while to figure them out. Most importantly, it was never mentioned how to properly end a training session in the Anaconda prompt to receive an exported .bytes file.
Slightly improved the instructions in the Ball Balancing tutorial
I added the changes that allowed me to do the installation.
|
|
||
| ``` | ||
| pip install tensorflow | ||
| pip install tensorflow==1.4.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In our requirement.txt, we already specified tensorflow==1.4.0 version, why would you specify it here again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some people copy and paste code from tutorials. If done like that conda would install the latest version of TensorFlow and it will ask for CUDA 9.0 later, hence the installation will give an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see.
|
|
||
| ``` | ||
| conda create -n ml-agents python=3.6 | ||
| conda create -n ml-agents python=3.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that we should change it from 3.6 to 3.5 here, since 3.6.5 doesn't work yet.
| ``` | ||
| pip install . | ||
| pip install docopt | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why will you install docopt again after "pip install ."?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow, the pip install . didn't include docopt and gave an error while training.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same problem on my side, but with pyyaml.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need Visual Studio Windows SDK 2015 to install pyyaml, also:
Had to paste this “lib” folder from C:\Program Files (x86)\Microsoft Visual Studio 14.0\lib
Into C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\PlatformSDK\lib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I solved it via command: easy_install pyyaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know. Perhaps all of these issues need to be in a "troubleshooting" page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't hurt to execute one more command if it get people through.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are planning to add a FAQ page, where we can add this in later.
docs/Installation-Windows.md
Outdated
| ### Install Nvidia CUDA toolkit | ||
|
|
||
| [Download](https://developer.nvidia.com/cuda-toolkit-archive) and install the CUDA toolkit from Nvidia's archive. The toolkit includes GPU-accelerated libraries, debugging and optimization tools, a C/C++ compiler and a runtime library and is needed to run ML-Agents. In this guide, we are using version 8.0.61 ([direct link](https://developer.nvidia.com/compute/cuda/8.0/Prod2/network_installers/cuda_8.0.61_win10_network-exe)). | ||
| [Download](https://developer.nvidia.com/cuda-toolkit-archive) and install the CUDA toolkit from Nvidia's archive. The toolkit includes GPU-accelerated libraries, debugging and optimization tools, a C/C++ (Step: Visual Studio 2015) compiler and a runtime library and is needed to run ML-Agents. In this guide, we are using version 8.0.61 ([direct link](https://developer.nvidia.com/compute/cuda/8.0/Prod2/network_installers/cuda_8.0.61_win10_network-exe)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why uninstall the Visual Studio 2015 helps here? Could you please explain?
Also maybe provide a hyperlink here to link to your added section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So Visual Studio 2017 does not work with CUDA 8.0. Unity comes by default with Visual Studio 2017 and when installing CUDA 8.0 it says the error that "No supported version of Visual Studio was found. Some components of CUDA Toolkit will not work properly. Please install Visual Studio first to get the full functionality". So Visual Studio needs to be uninstalled, and install Visual Studio 2015, or at least
Visual C++ Redistributable for Visual Studio 2015: https://www.microsoft.com/en-us/download/details.aspx?id=48145
Visual Studio Community with Visual Studio 2015 Windows SDK: https://msdn.microsoft.com/en-us/library/mt683786.aspx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it.
docs/Installation-Windows.md
Outdated
| Found device 0 with properties ... | ||
| ``` | ||
| <p> | ||
| Step Visual Studio 2015: unistall Visual Studio 2017 that comes with the Unity installation, download Visual Studio Enterprise 2015 and install the SDK when installing. If you don't want to install Visual Studio Enterprise 2015, at least install Visual C++ Redistributable for Visual Studio 2015 and Visual Studio 2015 Windows SDK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unistall -> uninstall
xiaomaogy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please address the comments I had regarding your PR? After that I will merge your stuff. Thanks for contributing.
I added more comments to explain why using python 3.5, Tensorflow 1.4.0, and comments and links for Visual Studio 2015. I erased the docopt installation and the part for the folders: Had to paste this “lib” folder from C:\Program Files (x86)\Microsoft Visual Studio 14.0\lib Into C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\PlatformSDK\lib Because this might have been only a problem for me. Thanks,
|
please switch the merge to develop, no master |
|
Changed the pull request from Master to develop. Thanks, |
|
@unityjeffrey @mmattar I've manually checked all the changes, and it works. Maybe we can also merge this into master since this is all docs change? |
mmattar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making these improvements! I made a few stylistic comments, but otherwise looks great.
| ```python | ||
| python3 python/learn.py <env_file_path> --run-id=<run-identifier> --train | ||
| ``` | ||
| **Note**: If you're using Anaconda, don't forget to activate the ml-agents environment first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "activate the ml-agents environment" mean? This would be the only place in the Docs that we mention that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Activate means, "write in the command line 'activate ml-agents'", and the environment that was created before is activated. Tensorflow also needs to be activated.
docs/Installation-Windows.md
Outdated
| ## Step 1: Install Python via Anaconda | ||
|
|
||
| [Download](https://www.anaconda.com/download/#windows) and install Anaconda for Windows. By using Anaconda, you can manage separate environments for different distributions of Python. Python 3 is required as we no longer support Python 2. In this guide, we are using Python version 3.6 and Anaconda version 5.1 ([64-bit](https://repo.continuum.io/archive/Anaconda3-5.1.0-Windows-x86_64.exe) or [32-bit](https://repo.continuum.io/archive/Anaconda3-5.1.0-Windows-x86.exe) direct links). | ||
| [Download](https://www.anaconda.com/download/#windows) and install Anaconda for Windows. By using Anaconda, you can manage separate environments for different distributions of Python. Python 3 is required as we no longer support Python 2. In this guide, we are using Python version 3.5 (Anaconda comes with python 3.6, we will create and environment with python 3.5) and Anaconda version 5.1 ([64-bit](https://repo.continuum.io/archive/Anaconda3-5.1.0-Windows-x86_64.exe) or [32-bit](https://repo.continuum.io/archive/Anaconda3-5.1.0-Windows-x86.exe) direct links). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In "(Anaconda comes with python 3.6, we will create and environment with python 3.5)" two quick comments:
- python --> Python
- and --> an
docs/Installation-Windows.md
Outdated
|
|
||
| After installation, you must open __Anaconda Navigator__ to finish the setup. From the Windows search bar, type _anaconda navigator_. You can close Anaconda Navigator after it opens. | ||
|
|
||
| If environmental variables were not created, or if you see the error "conda is not recognized as internal or external command", in System Variables "Path" add: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"If environmental" --> "If environment"
docs/Installation-Windows.md
Outdated
| ``` | ||
| Found device 0 with properties ... | ||
| ``` | ||
| <p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the paragraph html tags, we typically do not use them.
Hi, I did the changes in style. Thanks,
Fixed the links. Thanks,
Links are good finally.
Links are good finally.
mmattar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the requested changes.
|
Should I add a pull request to Master branch? @unityjeffrey @mmattar @xiaomaogy the detail between Python 3.5 and Python 3.6 is very important so perhaps it is good to add these changes to the master branch. |
I added the changes that allowed me to do the installation. At first I installed the latest version of Tensor-flow and it needed CUDA 9.0. I tested python version 3.6 and 3.5 and only works with 3.5. As a result of all the changes I made, ML Agents run and get trained correctly.